import service from "./index.js";

// 按需导出
// 获取页数
export function pageCount(data) {
    return service({
        url: '/admin/major/page/count',
        method: 'get',
        params: data
    })
}
// 获取列表数据
export function page(data, page) {
    return service({
        url: '/admin/major/page/' + page,
        method: 'get',
        params: data
    })
}
// 获取系名
export function departmentNames() {
    return service({
        url: '/admin/department/names',
        method: 'get',
    })
}
// 添加专业
export function majorAdd(data) {
    return service({
        url: '/admin/major',
        method: 'post',
        data: data
    })
}
// 删除专业
export function mixinDelete(id) {
    return service({
        url: '/admin/major/' + id,
        method: 'delete',
    })
}
// 获取详情
export function getMajor(id) {
    return service({
        url: '/admin/major/' + id,
        method: 'get'
    })
}
// 修改专业
export function majorEdit(data) {
    return service({
        url: '/admin/major',
        method: 'put',
        data: data
    })
}